Report post

What is an HTML comment?

I'm referring to comments within the code. What is an HTML Comment? An HTML comment is a part of the HTML code and it is used to explain the code. This can be helpful for other HTML coders when trying to interpret someone elses code. It can also be useful for yourself if you have to revisit your code in many months, or even years time.

How to use HTML comments in a multiline way?

We can use HTML comments in a multiline way. If we have a lot of information to write into comment we can use HTML multiline comment. The start tag will surround multiple lines like below. We will see that we can use comment tags in the same line of the comment text or in a new line too.

Why do I need to comment on my code?

Comments are mainly used to make our code more readable. They are completely hidden from the webpage and only show up in the code. Commenting on your code is a good practice as it helps us to express what the code is doing. It can act as an anchor for you if you want to change your code in the future.

What does the HTML tag suggest?

An HTML tag is a group of characters constituting a formatted command for Web pages that an HTML developer typically uses as a markup language to mark the beginning and end of an HTML element of an HTML document. Not many tags use an opening and closing tag; to cover the content.

Related articles

The World's Leading Crypto Trading Platform

Get my welcome gifts